function AboutAssistant() {

};

AboutAssistant.prototype.setup = function() {
	this.stageController = this.controller.stageController;
	$('appVer').innerText = "v" + Mojo.Controller.appInfo.version;
	$('build').innerText = "最后更新:  "  + Mojo.Controller.appInfo.build;
	
	this.controller.listen('weiboBox', Mojo.Event.tap,this.viewWeibo.bind(this));
	this.controller.listen('emailBox', Mojo.Event.tap,this.sentEmail.bind(this));
	this.controller.listen('webBox', Mojo.Event.tap,this.viewWeb.bind(this));
	this.controller.listen('donateBox', Mojo.Event.tap,this.donateWeb.bind(this));
	
};

AboutAssistant.prototype.sentEmail = function() {

	this.controller.serviceRequest("palm://com.palm.applicationManager", {
			method: 'open',
			parameters: {
				id: "com.palm.app.email",
				params: {
					recipients: [{
	                  type:"email",
	                  role:1,
	                  value:"463254086@qq.com"
	              }]
				}
			}
		});
	
};

AboutAssistant.prototype.viewWeibo = function() {
    
	this.controller.serviceRequest('palm://com.palm.applicationManager', {
	 	method: 'launch', 
	 	parameters: { 
		 	id: "com.noteday.weibo", 
		 	params: {
		 		'user':"兰花大盗"
		 	} 
	 	}
	 });
	
};

AboutAssistant.prototype.viewWeb = function() {
	this.controller.serviceRequest('palm://com.palm.applicationManager', {
		method: 'open',
		parameters: {
		id: 'com.palm.app.browser',
		params: {
			target: 'http://bbs.zoopda.com'
         }
		}
	});
};

AboutAssistant.prototype.donateWeb = function() {
	this.controller.serviceRequest('palm://com.palm.applicationManager', {
		method: 'open',
		parameters: {
		id: 'com.palm.app.browser',
		params: {
			target: 'https://me.alipay.com/linheng'
         }
		}
	});
};

AboutAssistant.prototype.activate = function(event) {
};

AboutAssistant.prototype.deactivate = function(event) {
};

AboutAssistant.prototype.cleanup = function(event) {	
	this.controller.stopListening('weiboBox', Mojo.Event.tap,this.viewWeibo.bind(this));
	this.controller.stopListening('emailBox', Mojo.Event.tap,this.sentEmail.bind(this));
	this.controller.stopListening('webBox', Mojo.Event.tap,this.viewWeb.bind(this));
	this.controller.stopListening('webBox', Mojo.Event.tap,this.donateWeb.bind(this));
};
